<template>
	<view>
		<view class="inven-tabs">
			<view class="inven-top" @click="cur = 0" :class="{ active: cur == 0 }"><text>计划物料</text></view>
			<view class="inven-top" @click="cur = 1" :class="{ active: cur == 1 }"><text>追加物料</text></view>
			<view class="inven-top" @click="cur = 2" :class="{ active: cur == 2 }"><text>申请退料</text></view>
		</view>
		
		<!-- 计划物料 -->
		<view class="relative-border" v-show="cur == 0">
			<view v-for="(item,index) in dataList" :key="index" :class="{'invencurrent':(currentIndex === index)}">
				<view class="invent-listcon" @click="invent(index)">
					<view class="invent-oddnumber">
						{{item.title}}
					</view>
					<view class="invent-content">
						<view class="invent-content-top">
							{{item.name}}
						</view>
						<view class="invent-content-top">
							{{item.number}}
						</view>
						<view class="invent-content-top">
							{{item.issuedquantity}}
						</view>
						<view class="invent-content-top">
							{{item.model}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<view v-show="cur == 1">内容二</view>
		<view v-show="cur == 2">内容三</view>

		<!-- 按钮 -->
		<view class="flexinven-button">
			<u-row gutter="16" class="flexinven-con">
				<u-col span="3">
					<view class="flexinven-flex">零部件</view>
				</u-col>
				<u-col span="3">
					<view class="flexinven-flex" @click="material">物料</view>
				</u-col>
				<u-col span="3">
					<view class="flexinven-flex">删行</view>
				</u-col>
				<u-col span="3">
					<view class="flexinven-flex">保存返回</view>
				</u-col>
			</u-row>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cur: 0,
				dataList: [{
					title: '物料编码: 0009',
					name: '物料名称: 批次号0',
					number: '数量: 89',
					issuedquantity: '已出库数量: 0',
					model: '规格型号: ',
				}]
			};
		},
		methods: {}
	};
</script>

<style lang="less" scoped>
	// tab栏
	.inven-tabs {
		display: flex;
		height: 35px;
		line-height: 35px;

		.inven-top {
			flex: 1;
			text-align: center;
			color: #fff;
			font-size: 14px;
			background-color: #999;
		}
	}

	// 当前样式
	.inven-tabs .active {
		background-color: #fdba33;
		color: #fff;
	}
</style>
